//
//  MBProductViewModel.swift
//  StarTimesON
//
//  Created by Toj on 1/4/23.
//  Copyright © 2023 StarTimes. All rights reserved.
//

import UIKit

class MBProductViewModel: NSObject {
    
    var isLoaded = false
    
    private(set) var commoditys: [MemberCommodityDto] = []
    
    init(commodityList: [MemberCommodityDto], couponList: [String: Coupon]) {
        isLoaded = false
        commoditys = commodityList
        for commodity in commoditys {
            let commodityID = String(commodity.id)
            commodity.coupon = couponList[commodityID]
        }
    }
}
